home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 9
/
The PC-SIG Library on CD ROM - Ninth Edition.iso
/
501_600
/
DISK0510
/
DISK0510.ZIP
/
LISTER
< prev
next >
Wrap
Text File
|
1985-08-08
|
768b
|
24 lines
PROGRAM LISTER; {a simple program to add line numbers to a listing}
{since it uses INPUT and OUTPUT for the files, you should run it like:
{ LISTER <INFILE >OUTFILE
{ or
{ LISTER <INFILE >PRN
{ to write to the printer.
{you could try:
{ LISTER <LISTER to see this pgm. with line numbers.}
VAR
STR : STRING; {for the line coming in; 80 char max!}
LINENUM : INTEGER;
BEGIN
LINENUM := 0;
WHILE NOT EOF DO
BEGIN
LINENUM := LINENUM + 1;
READLN(STR);
WRITELN(LINENUM:4, ':', STR);
END;
END.